#include<stdio.h>

void inverst(int *num,int n)
{
	int *p,temp,*i,*j,m=(n-1)/2;
	i=num;
	j=num+n-1;
	p=num+m;
	for(;i<=p;i++,j--)
	{
		temp=*i;
		*i=*j;
		*j=temp;
	}
}

int main()
{
	int i,num[10]={1,2,3,4,5,6,7,8,9,10};
	printf("The element of original array:\n");
	for(i=0;i<10;i++)
	{
		printf("%d ",num[i]);
	}
	printf("\n");
	inverst( num, 10);
	printf("The element has ben inverted:\n");
	for(i=0;i<10;i++)
	{
		printf("%d ",num[i]);
	}
	printf("\n");
	return 0;
}
